home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-ALPH.{_4 / SMP.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  916b  |  45 lines

  1. #ifndef __ASM_SMP_H
  2. #define __ASM_SMP_H
  3.  
  4. #ifdef __SMP__
  5.  
  6. #include <linux/tasks.h>
  7. #include <asm/pal.h>
  8.  
  9. struct cpuinfo_alpha {
  10.     unsigned long loops_per_sec;
  11.     unsigned int next;
  12.     unsigned long *pgd_cache;
  13.     unsigned long *pte_cache;
  14.     unsigned long pgtable_cache_sz;
  15.     unsigned long ipi_count;
  16. } __attribute__((aligned(32)));
  17.  
  18. extern struct cpuinfo_alpha cpu_data[NR_CPUS];
  19.  
  20. #define PROC_CHANGE_PENALTY     20
  21.  
  22. extern __volatile__ int cpu_number_map[NR_CPUS];
  23.  
  24. /* HACK: Cabrio WHAMI return value is bogus if more than 8 bits used.. :-( */
  25.  
  26. static __inline__ unsigned char hard_smp_processor_id(void)
  27. {
  28.     register unsigned char __r0 __asm__("$0");
  29.     __asm__ __volatile__(
  30.         "call_pal %1 #whami"
  31.         : "=r"(__r0)
  32.         :"i" (PAL_whami)
  33.         : "$1", "$22", "$23", "$24", "$25");
  34.     return __r0;
  35. }
  36.  
  37. #define smp_processor_id()    (current->processor)
  38. #define cpu_logical_map(cpu)    (cpu)
  39.  
  40. #endif /* __SMP__ */
  41.  
  42. #define NO_PROC_ID    (-1)
  43.  
  44. #endif
  45.